
last = str(input("请选择贷款类型:  1.商业贷款 2.公积金贷款  3.组合贷款"))
number = float(input("请输入贷款金额:"))
year = float(input("请选择期限（年）:"))
kk = 0.0475/12
ll = 0.049/12
qq = 0.0275/12
ww = 0.0325/12
if last == '1':
    if year <= 5:
        monthmoney = number*(kk * ((1+kk) ** (year*12))) / (((1+kk) ** (year*12)) - 1)
        sum = monthmoney * year * 12
        lixi = sum - number
        print(monthmoney)
        print(sum)
        print(lixi)
    elif year > 5:
        monthmoney = number*(ll * ((1+ll) ** (year*12))) / (((1+ll) ** (year*12)) - 1)
        sum = monthmoney * year * 12
        lixi = sum - number
        print(monthmoney)
        print(sum)
        print(lixi)
if last == '2':
    if year <= 5:
        monthmoney = number*(qq * ((1+qq) ** (year*12))) / (((1+qq) ** (year*12)) - 1)
        sum = monthmoney * year * 12
        lixi = sum - number
        print(monthmoney)
        print(sum)
        print(lixi)
    elif year > 5:
        monthmoney = number*(ww * ((1+ww) ** (year*12))) / (((1+ww) ** (year*12)) - 1)
        sum = monthmoney * year * 12
        lixi = sum - number
        print(monthmoney)
        print(sum)
        print(lixi)
